package nc.ui.common;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import nc.ui.trade.manage.BillManageUI;

public class ShowKeyAction extends AbstractAction
{
	BillManageUI bui;
	public ShowKeyAction(BillManageUI bui)
	{
		this.bui = bui;
	}
	public void actionPerformed(ActionEvent arg0) 
	{
		if(bui.isListPanelSelected())
		{
			int col = bui.getBillListPanel().getBodyTable().getSelectedColumn();
			bui.showHintMessage(bui.getBillListPanel().getBodyBillModel().getBodyKeyByCol(col));
			return;
		}
		int col = bui.getBillCardPanel().getBillTable().getSelectedColumn();
		bui.showHintMessage(bui.getBillCardPanel().getBillModel().getBodyKeyByCol(col));
	}
}